package com.hospital.ssm.service.serviceimpl;

import com.hospital.ssm.mapper.DepartmentMapper;
import com.hospital.ssm.model.Department;
import com.hospital.ssm.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> DepartmentList(Integer id) throws Exception {
        return departmentMapper.DepartmentList(id);
    }

    @Override
    public int DepartmentAdd(Department department) throws Exception {
        return departmentMapper.DepartmentAdd(department);
    }

    @Override
    public int DepartmentDelete(Integer id) throws Exception {
        return departmentMapper.DepartmentDelete(id);
    }

    @Override
    public int DepartmentUpdate(Department department) throws Exception {
        return departmentMapper.DepartmentUpdate(department);
    }

    @Override
    public int DepartmentUpdatehtStatus(Department department) throws Exception {
        return departmentMapper.DepartmentUpdatehtStatus(department);
    }
}
